package hhpoll

class PollItem {
    User creator
    Poll poll
    String item
    Date createDate = new Date()

    static belongsTo = Poll
    static constraints = { 
        creator()
        poll()
        item(maxSize:80,blank:false)
        createDate(validator: { return (it > new Date()) })
    }

    String toString() {
        return "${this.id}: ${this.item}"
    }
}
